import yagmail


def send_email(sender, pwd, smtp_host, receiver, subject, contents):
    """发送邮件
    Args:
        sender: 发件人邮箱
        pwd: 发件人smtp验证密码
        smtp_host: 比如smtp.126.com
        receiver: 收件人邮箱
        subject: 邮件主题
        content: 邮件内容
    """
    yag = yagmail.SMTP(user=sender, password=pwd, host=smtp_host, smtp_ssl=True)
    yag.send(to=receiver, subject=subject, contents=contents)
    return
